/**
 * 
 */
package com.sad.model;

import java.io.IOException;

import org.codehaus.jackson.map.ObjectMapper;

/**
 *  001 用户角色为系统维护员<p>
 *	010 用户角色为运行分析员<p>
 *	100 用户角色为业务分析员<p>
 *
 * @author zhaoqy
 *
 */
public class Role implements IModel {

	private static final long serialVersionUID = 158492257472743495L;

	private String roleID;
	private String roleName;
	private int roleValue;
	private String roleDescription;

	/**
	 * @return the roleID
	 */
	public String getRoleID() {
		return roleID;
	}

	/**
	 * @param roleID
	 *            the roleID to set
	 */
	public void setRoleID(String roleID) {
		this.roleID = roleID;
	}

	/**
	 * @return the roleName
	 */
	public String getRoleName() {
		return roleName;
	}

	/**
	 * @param roleName
	 *            the roleName to set
	 */
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	/**
	 * @return the roleValue
	 */
	public int getRoleValue() {
		return roleValue;
	}

	/**
	 * @param roleValue
	 *            the roleValue to set
	 */
	public void setRoleValue(int roleValue) {
		this.roleValue = roleValue;
	}

	/**
	 * @return the roleDescription
	 */
	public String getRoleDescription() {
		return roleDescription;
	}

	/**
	 * @param roleDescription
	 *            the roleDescription to set
	 */
	public void setRoleDescription(String roleDescription) {
		this.roleDescription = roleDescription;
	}

	@Override
	public String toJson() {
		ObjectMapper objectMapper = new ObjectMapper();
		String json = "";
		try {
			json = objectMapper.writeValueAsString(this);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return json;
	}
}
